<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>Artistic Style GNUstep</title>
    <meta http-equiv="Content-Language" content="en-us" />
    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
    <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>

<body>

    <h1>Artistic Style Developer Information</h1>

    <h2 class="large"><span style="white-space: nowrap;">Objective-C</span> on Windows and Linux</h2>

    <p>
        &nbsp;</p>
    <p class="noindent">
        The best platform for developing <span style="white-space: nowrap;">Objective-C</span> is Mac OS. But <span style="white-space: nowrap;">Objective-C</span> programs can also be compiled
        and run on Windows or Linux by using GNUstep and an <span style="white-space: nowrap;">Objective-C</span> compiler. GNUstep is an object-oriented
        library that provides the programmer with a range of libraries and utilities for building <span style="white-space: nowrap;">Objective-C</span>
        applications. GNUstep is generally compatible with recent developments of the MacOS (Cocoa) API.</p>
    <p class="noindent">
        <span style="white-space: nowrap;">Objective-C</span> development environments are not readily available on Windows or Linux.
        CodeBlocks can be used if additional options are set and an <span style="white-space: nowrap;">Objective-C</span> compiler is used.. The Example program
        can also be compiled by using a text editor with compile capability such as SciTE. Or it may be compiled from
        the command line. Or scripts can be written using Python, Batch, Bash, or other scripting languages. Compile options
        for each platform are included in the following descriptions.</p>

    <h3><span style="white-space: nowrap;">Objective-C</span> on Windows</h3>

    <p>
        <span style="white-space: nowrap;">Objective-C</span> on Windows requires the GNUstep packages and the MinGW compiler. Installing MinGW is optional
        since it is included with GNUstep. If MinGW is installed separately be sure to include the <span style="white-space: nowrap;">Objective-C</span> compiler
        package. The GNUstep installation packages are available at the <a href="http://www.gnustep.org/experience/Windows.html">
            GNUstep Windows Installer</a> page. For development you will need GNUstep MSYS, GNUstep Core, and GNUstep
        Devel. GNUstep Cairo is optional. For now, it is best to use the "stable" packages.</p>
    <p>
        GNUstep MSYS is an application of the MinGW MSYS system. It consists of a console shell and supporting programs
        that are used to simulate a Linux environment. It can build programs that use the Linux Autoconf system and run
        shell scripts. There are limits, of course, to what can be done.</p>
    <p>
        GNUstep application packages 
        are an optional install from the installer web page. Since they are Mac applications
        the menu display will be separate from the application window. This can be changed by running the "System Preferences"
        program and selecting Themes &gt; WinUXThem. Most applications will then display a window with a menu at the top
        as in Windows. <a href="http://www.gnustep.it/enrico/gworkspace/">GWorkspace</a> is a fairly large application
        that includes source code. It can be used as a reference for <span style="white-space: nowrap;">Objective-C</span> coding. The GNUstep MSYS shell
        must be used for the compile since Autoconf is used. There are INSTALL instructions in the top-level GWorkspace
        directory.</p>
    <p>
        To compile the Artistic Style Example program the GNUstep development packages must be installed. Artistic Style
        should be compiled with MinGW as a DLL or static library for linking with the example. MSYS and Autoconf are NOT
        used for the compile. You can use either the MinGW compiler that comes with MSYS or a separate installation. MinGW
        can link directly against the DLL, a library file is not necessary (but can be used if you want). In the following
        options the "-L.\" is for linking with a DLL in the same directory as the example. If the library is in another
        location the compile option must be changed to reflect this. The option -Wl,-enable-stdcall-fixup disables a 
        warning message for 32&#8209;bit compiles. Options for compiling the Example program using the GNUstep compiler
        are:</p>
    <p>
        $(GNUstepPath)\bin\gcc&nbsp; Example.m&nbsp; -o&nbsp;Example<br />
        -I$(GNUstepPath)\GNUstep\System\Library\Headers&nbsp; -fconstant-string-class=NSConstantString&nbsp; -D_NATIVE_OBJC_EXCEPTIONS<br />
        -Os&nbsp; -Wall&nbsp; -Wextra&nbsp; -Wl,-enable-stdcall-fixup<br />
        -L$(GNUstepPath)\GNUstep\System\Library\Libraries&nbsp; -lgnustep-base&nbsp; -lobjc<br />
        -L.\&nbsp; -lAStyle</p>
    <p>
        The compiled Example will run as any other console program. If Artistic Style is linked as a DLL it must be in
        the same directory as the example, or in another system path directory.</p>

    <h3><span style="white-space: nowrap;">Objective-C</span> on Linux</h3>

    <p>
        <span style="white-space: nowrap;">Objective-C</span> on Linux requires the GNUstep packages and the GCC or Clang compiler. On many systems GNUstep
        will be available as a packaged install. For a typical installation the gobjc, gobjc++, gnustep, and 
        gnustep-core-devel packages are needed. The gobjc packages are the <span style="white-space: nowrap;">Objective-C</span> compilers for GCC. If packages
        are not available they can be compiled with source code available at the 
        <a href="http://www.gnustep.org/">GNUstep</a> website.</p>
    <p>
        With Gnome systems, GNUstep programs will be added to the system menu. Applications installed are System
        Preferences, Gorm, Project Center, GWorkspace, and a few others. Since they are Mac applications the 
        application menu display is separate from the application window. This can NOT be changed with "System Preferences"
        as on Windows. <a href="http://www.gnustep.it/enrico/gworkspace/">GWorkspace</a>
        is a fairly large application that includes source code if downloaded from the website. It can be used as a reference
        for <span style="white-space: nowrap;">Objective-C</span> coding. There are INSTALL instructions in the top-level GWorkspace directory.</p>
    <p>
        To compile the Artistic Style Example program the GNUstep development packages must be installed. Artistic Style
        should be compiled as a shared or static library for linking with the example. In the following options the "-L./"
        and "-Wl,-rpath,./" are for linking and executing with a shared library in the same directory as the example.
        If the library is in another location the compile options must be changed to reflect this. On some installations
        GNUstep may install to different directories. Options for compiling the Example program are:</p>
    <p>
        gcc &nbsp; Example.m&nbsp; -o Example<br />
        -I/usr/include/GNUstep&nbsp; -fconstant-string-class=NSConstantString&nbsp; -D_NATIVE_OBJC_EXCEPTIONS<br />
        -Os&nbsp; -Wall&nbsp; -Wextra<br />
        -L/usr/lib/GNUstep&nbsp; -lgnustep-base&nbsp; -lobjc<br />
        -L./&nbsp; -lastyle<br />
        -Wl,-rpath,./</p>
    <p>
        The compiled Example will run as any other console program. If Artistic Style is linked as a shared library it
        must be in the same directory as the example when compiled with the above options.</p>
    <p>
        &nbsp;</p>

    <center style="margin-left: -0.4in;">
        <a href="http://sourceforge.net/projects/astyle">
            <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a>
    </center>

    <p>
        &nbsp;</p>
</body>

</html>

